package routers

import (
	"backend/controllers"
	"backend/services"
	"backend/utils"

	"github.com/gin-gonic/gin"
)

func RegisterPerminssionRoutes(r *gin.RouterGroup) {
	perminssionservice := services.NewPermissionServices(utils.DB)
	permissionControl := controllers.NewPermissionControl(perminssionservice)
	r.POST("/permission/create", permissionControl.Create)
	r.PUT("/permission/:id/update", permissionControl.Update)
	r.DELETE("/permission/:id/delete", permissionControl.Delete)
	r.GET("/permission/list", permissionControl.GetPermissionList)

}
